<template>
  <div class="search" :class="{fixed: isAbsolute}">
    <div class="input">
      <span class="iconfont search-icon">&#xe6ac;</span>
      <span>搜索饿了么商家、商品名称</span>
    </div>
  </div>
</template>

<script>
export default {
  name: 'HomeSearch',
  props: {
    isAbsolute: Boolean
  }
}
</script>

<style lang="stylus" scoped>
  @import '~styles/common.styl'
  .fixed
    z-index 2
    position fixed
    top 0
    left 0
    right 0
  .search
    height 1rem
    padding .13rem .25rem
    $bgGradient()
    .input
      height .74rem
      line-height .74rem
      text-align center
      color #999999
      font-weight 300
      background-color #ffffff
      border-radius .04rem
      .search-icon
        font-size .3rem
        font-weight bold
</style>
